package com.ruoyi.template.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import lombok.Data;

@TableName(value ="tb_template_detail")
@Data
public class TemplateDetail implements Serializable {
    /**
     * 
     */
    @TableId(value = "id")
    private String id;

    /**
     * 模版ID
     */
    @TableField(value = "template_id")
    private String templateId;

    /**
     * 审核人ID
     */
    @TableField(value = "reviewer_id")
    private String reviewerId;

    /**
     * 审核人
     */
    @TableField(value = "reviewer_name")
    private String reviewerName;

    /**
     * 审核顺序
     */
    @TableField(value = "review_order")
    private Integer reviewOrder;

    public TemplateDetail(String id, String templateId, String reviewerId, String reviewerName, Integer reviewOrder){
        this.id = id;
        this.templateId = templateId;
        this.reviewerId = reviewerId;
        this.reviewerName = reviewerName;
        this.reviewOrder = reviewOrder;
    }

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TemplateDetail other = (TemplateDetail) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getTemplateId() == null ? other.getTemplateId() == null : this.getTemplateId().equals(other.getTemplateId()))
            && (this.getReviewerId() == null ? other.getReviewerId() == null : this.getReviewerId().equals(other.getReviewerId()))
            && (this.getReviewerName() == null ? other.getReviewerName() == null : this.getReviewerName().equals(other.getReviewerName()))
            && (this.getReviewOrder() == null ? other.getReviewOrder() == null : this.getReviewOrder().equals(other.getReviewOrder()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getTemplateId() == null) ? 0 : getTemplateId().hashCode());
        result = prime * result + ((getReviewerId() == null) ? 0 : getReviewerId().hashCode());
        result = prime * result + ((getReviewerName() == null) ? 0 : getReviewerName().hashCode());
        result = prime * result + ((getReviewOrder() == null) ? 0 : getReviewOrder().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", templateId=").append(templateId);
        sb.append(", reviewerId=").append(reviewerId);
        sb.append(", reviewerName=").append(reviewerName);
        sb.append(", reviewOrder=").append(reviewOrder);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}